﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShopManager.aspx.cs" Inherits="shop_ShopManager" %>

<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>开通网店</title>
    <link href="../style/main.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">
        function uwgShop_BeforeRowActivateHandler(gridName, rowId)
        {
	        var SuperID = igtbl_getRowById(rowId).getCellFromKey("ID").getValue();
	        document.form1.hSuperID.value = SuperID;
	        
	        var SiteURL = igtbl_getRowById(rowId).getCellFromKey("SiteURL").getValue();
	        document.form1.hSiteURL.value = SiteURL;
        }
        
        function btStopClick()
        {
            if (document.form1.hSuperID.value=="")
            {
                alert("请选择要操作的记录！");
                
                return false;
            }
            else
            {
                return window.confirm("确认要暂停网店吗？");
            }
        }
        
        function btStartClick()
        {
            if (document.form1.hSuperID.value=="")
            {
                alert("请选择要操作的记录！");
                
                return false;
            }
            else
            {
                return window.confirm("确认要开通网店吗？");
            }
        }
        
    </script>

</head>
<body>
    <center>
        <form id="form1" runat="server">
        <br />
        <div style="text-align: center">
            <table style="width: 98%; vertical-align: middle; background-color: #DAE7F8;" border="0px"
                cellpadding="0px" cellspacing="1px">
                <tr>
                    <td>
                        <igmisc:WebPanel ID="WebPanel1" runat="server" BackColor="#DAE7F8" BorderColor="#106DB0"
                            BorderWidth="1px" StyleSetName="" Width="100%" BorderStyle="Solid" Expanded="False">
                            <Header Text="开通网店">
                                <ExpandedAppearance>
                                    <Styles BackColor="#DAE7F8" Font-Bold="True" Height="26px">
                                    </Styles>
                                </ExpandedAppearance>
                            </Header>
                        </igmisc:WebPanel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <igtbl:UltraWebGrid ID="uwgShop" runat="server" Height="350px" Width="100%" OnPageIndexChanged="uwgShop_PageIndexChanged">
                            <Bands>
                                <igtbl:UltraGridBand>
                                    <Columns>
                                        <igtbl:UltraGridColumn BaseColumnName="ID" Hidden="True" Key="ID">
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="ShopNO" HeaderText="店铺编号" Key="ShopNO" Width="100px">
                                            <Header Caption="店铺编号">
                                                <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="ShopName" HeaderText="店铺名称" Key="ShopName"
                                            Width="140px">
                                            <Header Caption="店铺名称">
                                                <RowLayoutColumnInfo OriginX="2" />
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="2" />
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="SiteTitle" HeaderText="站点名称" Key="ParentShop"
                                            Width="160px">
                                            <Header Caption="站点名称">
                                                <RowLayoutColumnInfo OriginX="3" />
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="3" />
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="SiteURL" HeaderText="网店域名" Key="SiteURL" Width="160px">
                                            <Header Caption="网店域名">
                                                <RowLayoutColumnInfo OriginX="4" />
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="4" />
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="CreateDate" HeaderText="注册日期" Key="CreateDate"
                                            Width="120px">
                                            <Header Caption="注册日期">
                                                <RowLayoutColumnInfo OriginX="5" />
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="5" />
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                        <igtbl:UltraGridColumn BaseColumnName="SiteState" HeaderText="状态" Key="SiteState"
                                            Width="140px">
                                            <Header Caption="状态">
                                                <RowLayoutColumnInfo OriginX="6" />
                                            </Header>
                                            <Footer>
                                                <RowLayoutColumnInfo OriginX="6" />
                                            </Footer>
                                        </igtbl:UltraGridColumn>
                                    </Columns>
                                    <AddNewRow View="NotSet" Visible="NotSet">
                                    </AddNewRow>
                                </igtbl:UltraGridBand>
                            </Bands>
                            <DisplayLayout Version="4.00" SelectTypeRowDefault="Extended" Name="uwgShop" AllowSortingDefault="OnClient"
                                AllowColSizingDefault="Free" RowHeightDefault="20px" TableLayout="Fixed" ViewType="Hierarchical"
                                AllowColumnMovingDefault="OnServer" HeaderClickActionDefault="SortMulti" StationaryMargins="Header"
                                BorderCollapseDefault="Separate" StationaryMarginsOutlookGroupBy="True" AutoGenerateColumns="False"
                                CellClickActionDefault="RowSelect" IndentationTypeDefault="Flat" NoDataMessage="没有查询到数据！"
                                UseFixedHeaders="True">
                                <FrameStyle BackColor="Window" BorderWidth="1px" Font-Names="Microsoft Sans Serif"
                                    Font-Size="8.25pt" Height="350px" Width="100%">
                                </FrameStyle>
                                <Pager MinimumPagesForDisplay="2" AllowPaging="True" NextText="下页" PageSize="20"
                                    PrevText="上页" StyleMode="ComboBox" Pattern="&lt;table width=100%&gt;&lt;tr&gt;&lt;td align=left&gt;页码：[currentpageindex]/[pagecount] 每页:[pagesize]条&lt;/td&gt;&lt;td align=right&gt;[default]&lt;td&gt;&lt;/tr&gt;&lt;/table&gt;">
                                    <Style BackColor="#FFFF99">
                                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" > </BorderDetails ></Style>
                                </Pager>
                                <EditCellStyleDefault BorderWidth="0px" BorderStyle="None">
                                </EditCellStyleDefault>
                                <FooterStyleDefault BackColor="LightGray" BorderWidth="1px" BorderStyle="Solid">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                    </BorderDetails>
                                </FooterStyleDefault>
                                <HeaderStyleDefault HorizontalAlign="Center" BorderStyle="Solid" Height="26px" VerticalAlign="Middle">
                                    <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px">
                                    </BorderDetails>
                                </HeaderStyleDefault>
                                <RowSelectorStyleDefault Width="10px">
                                </RowSelectorStyleDefault>
                                <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid"
                                    Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
                                    <Padding Left="3px"></Padding>
                                    <BorderDetails ColorLeft="Window" ColorTop="Window"></BorderDetails>
                                </RowStyleDefault>
                                <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                                </GroupByRowStyleDefault>
                                <SelectedRowStyleDefault BackColor="#E4FFCA" BorderColor="#99FF99" BorderStyle="Solid"
                                    BorderWidth="1px" Cursor="Hand">
                                </SelectedRowStyleDefault>
                                <GroupByBox Hidden="True" Prompt="">
                                    <Style BackColor="ActiveBorder" BorderColor="Window">
                                        </Style>
                                </GroupByBox>
                                <AddNewBox>
                                    <Style BackColor="Window" BorderColor="InactiveCaption" BorderWidth="1px" BorderStyle="Solid">
                                        <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" > </BorderDetails ></Style>
                                </AddNewBox>
                                <ActivationObject BorderColor="" BorderWidth="">
                                </ActivationObject>
                                <FilterOptionsDefault>
                                    <FilterDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver"
                                        BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                        Font-Size="11px" Height="300px" Width="200px">
                                        <Padding Left="2px"></Padding>
                                    </FilterDropDownStyle>
                                    <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
                                    </FilterHighlightRowStyle>
                                    <FilterOperandDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver"
                                        BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                        Font-Size="11px">
                                        <Padding Left="2px"></Padding>
                                    </FilterOperandDropDownStyle>
                                </FilterOptionsDefault>
                                <ClientSideEvents BeforeRowActivateHandler="uwgShop_BeforeRowActivateHandler" />
                            </DisplayLayout>
                        </igtbl:UltraWebGrid>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div style="width: 100%; text-align: left; height: 26px; vertical-align: middle;">
                            &nbsp;&nbsp;<asp:Button ID="btStart" runat="server" Text="开通网店" Height="22px" Width="90px"
                                OnClick="btStart_Click" OnClientClick="return btStartClick()" />
                            &nbsp;&nbsp;<asp:Button ID="btStop" runat="server" Text="暂停网店" Height="22px" Width="90px"
                                OnClick="btStop_Click" OnClientClick="return btStopClick()" />
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <asp:TextBox ID="hSiteID" runat="server" Visible="false"></asp:TextBox>
        <asp:HiddenField ID="hSuperID" runat="server" />
        <asp:HiddenField ID="hSiteURL" runat="server" />
        </form>
    </center>
</body>
</html>
